cmake_minimum_required(VERSION 3.22.1)
project(acl_yolov8)

set(CMAKE_CXX_STANDARD 14)
add_definitions(-DENABLE_DVPP_INTERFACE)

set(FFMPEG_PATH "/usr/local/lib")
set(FFMPEG_INCLUDE "/usr/include")
set(DDK_PATH "/usr/local/Ascend/ascend-toolkit/latest")
set(NPU_HOST_LIB "${DDK_PATH}/runtime/lib64/stub")

set(INC_PATH ${DDK_PATH})
set(LIB_PATH ${NPU_HOST_LIB})
set(FFMPEG_LIB_PATH  /usr/local/Ascend/ascend-toolkit/latest/thirdpart/lib)

include_directories(
        /usr/local/Ascend/ascend-toolkit/latest/thirdpart/include
        ${INC_PATH}/runtime/include/
        ${INC_PATH}/include/
        /usr/include/opencv4
)

link_directories(
        ${LIB_PATH}
        ${FFMPEG_LIB_PATH}
        /usr/lib/aarch64-linux-gnu
)






add_executable(${PROJECT_NAME} main.cpp  BasicClient.cpp Common.cpp ImageProc.cpp VdecHelper.cpp VencHelper.cpp VideoRead.cpp VideoWrite.cpp CameraRead.cpp ModelProc.cpp)
target_link_libraries(${PROJECT_NAME}
        ascendcl
        acl_dvpp
        stdc++
        dl
        pthread
        avcodec
        avformat
        avutil
        swresample
        swscale
        avdevice
        opencv_core
        opencv_imgproc
        opencv_imgcodecs
        )

add_compile_options(${PROJECT_NAME}
        -O2
        -Wall
        -fpic
        )